<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQingfengProposalsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('qingfeng_proposals', function (Blueprint $table) {
            $table->id();
            $table->string('accuse_name')->comment('被提建议的人的名字');
            $table->text('content')->comment('具体内容');
            $table->text('images')->comment('图片 paths');
            $table->integer('user_id')->comment('提意见人的 user_id');
            $table->integer('check_status')->default(0);
            $table->string('check_message')->nullable();
            $table->integer('push_time');
            $table->index('user_id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('qingfeng_proposals');
    }
}
